﻿using System;

namespace FlashPay.Service.Sys
{
    using FlashPay.EF.Models;
    using FlashPay.Entity;
    using FlashPay.Entity.Parameter;
    using FlashPay.Entity.Request.Sys;
    using FlashPay.Entity.Response.Sys;
    using System.Collections.Generic;

    /// <summary>
    /// 系统配置业务接口
    /// </summary>
    public interface SysConfigService
    {
        /// <summary>
        /// 根据编号获取系统配置
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>菜单</returns>
        SysConfigResponse Get(int configId, int companyID);

        /// <summary>
        /// 获取系统配置列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        List<SysConfigResponse> GetList(SysConfigQuery query);

        /// <summary>
        /// 系统配置新增或编辑
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult AddOrEdit(SysConfigAddOrEditRequest request);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="configId"></param>
        /// <returns></returns>
        JResult Delete(int configId);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <returns>PagedList<SysConfig></returns>
        PagedList<SysConfigResponse> GetPager(SysConfigQuery query);

        #region 第三方接口相关代码
        /// <summary>
        /// 获取第三方接口列表
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>菜单</returns>
        PagedList<PaymentInterfaceNew> GetPayMentInterfaceList(PaymentInterfaceQuery request);

        /// <summary>
        /// 获取某第三方接口详细信息
        /// </summary>
        JResult<PaymentInterface> GetDetail(PaymentInterfaceQuery request);

        /// <summary>
        /// 获取某第三方接口多重信息
        /// </summary>
        JResult<PaymentInterfaceMany> GetManyInfo(PaymentInterfaceQuery request);

        /// <summary>
        /// 添加或修改
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult AddOrEditInterface(PaymentInterfaceQuery request);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="configId"></param>
        /// <returns></returns>
        JResult DeleteInterface(PaymentInterfaceQuery request);

        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult UpdateStatus(PaymentInterfaceQuery request);
        #endregion

        /// <summary>
        /// 获取推送地址列表
        /// </summary>
        PagedList<ExtApiPushUrl> GetPushAddressList(PushAddressQuery query);

        /// <summary>
        /// 获取交易类型信息
        /// </summary>
        string GetTransType(int companyId, int ConfigValue, string ConfigCode);

        /// <summary>
        /// 获取交易类型列表
        /// </summary>
        PagedList<SysConfig> GetTransTypeList(SysConfigAddOrEditRequest sysRequest);

        /// <summary>
        /// 获取交易类型列表(新)
        /// </summary>
        PagedList<SysConfig> GetTransTypeListNew(SysConfigAddOrEditRequest sysRequest);

    }
}
